/*
 * @Author: wuzhen
 * @Date: 2019-12-21 13:47:38
 * @LastEditors  : wuzhen
 * @LastEditTime : 2019-12-28 14:42:46
 * @Description: 菜单数据
 */
// const Mock = require("mockjs");
// 用户信息
const userInfo = () => {
  const res = {
    system_adminpid: "8192",
    system_sysmenus: [
      {
        actionid: 0,
        iconCls: "fa-cog",
        moduleid: 0,
        state: "open",
        text: "系统权限",
        url: "system",
        children: [
          {
            actionid: 0,
            iconCls: "fa-child",
            leaf: true,
            moduleid: 1001,
            state: "open",
            text: "账号管理",
            url: "member"
          },
          {
            actionid: 0,
            iconCls: "fa-child",
            leaf: true,
            moduleid: 1001,
            state: "open",
            text: "角色管理",
            url: "role"
          }
        ]
      }
    ],
    system_memberinfo: {
      account: "admin",
      kefuid: 2800001,
      memberid: 1000001,
      membername: "管理员",
      status: 10,
      type: 8192
    },
    system_rmodules: [
      {
        moduleid: 1001,
        modulename: "账号管理"
      },
      {
        moduleid: 1002,
        modulename: "权限管理"
      },
      {
        moduleid: 1003,
        modulename: "角色管理"
      }
    ],
    system_actionmap: {
      1010: "登录",
      1030: "配置",
      1001: "查询",
      1002: "新增",
      1003: "修改",
      1004: "删除",
      1020: "同步"
    },
    code: 200
  };
  return new Promise(resolve => {
    resolve(res);
  });
};

// 管理员列表
const adminList = () => {
  const res = {
    rows: [
      {
        account: "joe",
        createtime: 1576668754589,
        kefuid: 0,
        memberid: 1000013,
        membername: "joe",
        roleids: [2003, 2004],
        status: 10,
        type: 0,
        updatetime: 0
      },
      {
        account: "joo",
        createtime: 1576634486823,
        kefuid: 0,
        memberid: 1000011,
        membername: "aa",
        roleids: [2001],
        status: 10,
        type: 0,
        updatetime: 1576635182096
      },
      {
        account: "joy",
        createtime: 1576573016060,
        kefuid: 0,
        memberid: 1000010,
        membername: "joe",
        roleids: [2002, 2001],
        status: 10,
        type: 0,
        updatetime: 1576573330206
      },
      {
        account: "admin",
        createtime: 1450000000000,
        kefuid: 2800001,
        memberid: 1000001,
        membername: "管理员",
        roleids: [],
        status: 10,
        type: 8192,
        updatetime: 1450000000000
      }
    ],
    total: 10
  };
  return new Promise(resolve => {
    resolve(res);
  });
};
// 管理员列表
const roleList = () => {
  const res = {
    rows: [
      {
        createtime: 1573089259967,
        creator: "管理员",
        description: "代理",
        roleid: 2001,
        rolename: "agent"
      },
      {
        createtime: 1525683319807,
        description: "ttt",
        roleid: 2002,
        rolename: "test"
      },
      {
        createtime: 1576573857463,
        description: "aa",
        roleid: 2003,
        rolename: "aaa"
      },
      {
        createtime: 1576635516903,
        description: "aa",
        roleid: 2004,
        rolename: "a"
      },
      {
        createtime: 1576738668328,
        creator: "管理员",
        description: "123",
        roleid: 2005,
        rolename: "wujun1"
      }
    ],
    total: 5
  };
  return new Promise(resolve => {
    resolve(res);
  });
};
export default {
  userInfo,
  adminList,
  roleList
};
